/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package perplexity;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author mwh
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        try {
            // TODO code application logic here
            ARPALMEstimator est = new ARPALMEstimator("/home/mwh/ppltest/trigram.lm");

            String str = "ingen gør indsigelser";
            String[] strA = str.split(" ");
                
            List<String> t = new ArrayList<String>(Arrays.asList(strA));
            System.err.println(t);
            
            
            System.err.println(est.getEstimate(t));
        //            
//            List<String> t = new ArrayList<String>();
//            t.add("alle");
//
//
//
            PerplexityCalculator p = new PerplexityCalculator(est, 3);
            System.err.println(p.calculate("/home/mwh/ppltest/euroeval.txt"));
            //System.err.println(p.calculate("/home/mwh/ppltest/1w.txt"));

        } catch (FileNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }


    }
}
